package Database;

/**
 *
 * @author Alexander
 */
public class SongIDCounter {

    private static int Song_ID_Count;

    public static String ID() {
        System.out.println("SongIDCounter.ID()");
        int tempSongIDCount = Song_ID_Count;
        String SongID = "";
        if (tempSongIDCount < 10) {
            SongID = "00000" + tempSongIDCount;
        }
        else if ((tempSongIDCount >= 10) && (tempSongIDCount < 100)) {
            SongID = "0000" + tempSongIDCount;
        }
        else if ((tempSongIDCount >= 100) && (tempSongIDCount < 1000)) {
            SongID = "000" + tempSongIDCount;
        }
        else if ((tempSongIDCount >= 1000) && (tempSongIDCount < 10000)) {
            SongID = "00" + tempSongIDCount;
        }
        else if ((tempSongIDCount >= 1000) && (tempSongIDCount < 10000)) {
            SongID = "0" + tempSongIDCount;
        }
        else if ((tempSongIDCount >= 10000) && (tempSongIDCount <= 100000)) {
            SongID = "" + tempSongIDCount;
        }
        return SongID;
    }

    /**
     * add to Song_ID_Count
     */
    public static void Add_To_Song_ID_Count() {
        System.out.println("SongIDCounter.Add_To_Song_ID_Count()");
        Song_ID_Count++;
    }
}
